Skip to content

Conversation

czarkoff
Copy link
Contributor

Currently when the file history is requested, git log runs against the current branch. Thus if file history is requested for a file from a commit from another visible branch, the selected commit does not show up in the history. When the file was added in another branch and was not yet seen in the current branch, the history view is just empty.

This PR makes the log run against the selected commit, which makes most sense to me.

Another approach would probably be to find a first parent reference containing current commit and run log against that, though to me it would be a bit counter-intuitive.

When file histories are accessed from the commit details view, run git log for the inspected commit.  Previously the log was ran against current branch regardless whether the inspected commit belongs to that branch.
@NilsPvR
Copy link
Contributor

NilsPvR commented Nov 16, 2024

Hi, make sure your target branch for the PR is develop and not master.

@czarkoff czarkoff changed the base branch from master to develop November 16, 2024 22:18
@love-linger love-linger self-assigned this Nov 17, 2024
@love-linger love-linger added the enhancement New feature or request label Nov 17, 2024
@love-linger love-linger merged commit 5301645 into sourcegit-scm:develop Nov 17, 2024
@czarkoff czarkoff deleted the file-histories-from-commit-view branch November 17, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants